<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAddressTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if(!Schema::HasTable('address')){
            Schema::create('address', function (Blueprint $table) {
                $table->increments('id');
                $table->integer('uid');
                $table->string('name')->comment('收货人姓名');
                $table->string('phone')->comment('联系方式');
                $table->string('prov');
                $table->string('city');
                $table->string('dist')->nullable();
                $table->string('detail')->comment('详细地址');
                $table->enum('status',['0','1'])->comments('0为默认,1为其他')->default('1');
                $table->timestamps();
            });
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        // Schema::drop('address');

    }
}
